package com.sinosoft.sinopay.apiservice.batchpay.dto;

import com.sinosoft.sinopay.apiservice.batchpay.util.StrTool;
import com.sinosoft.sinocloud.platform.base.SinoBaseDTO;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 【 生成XML文件模板DTO 】
 *
 * @author chenzhiheng
 * @version V1.0
 * @date 16/12/22
 */
public class PayTradeMainDTO extends SinoBaseDTO {

    /**交易流水号：业务方传递过来的唯一序列号*/
    private String serialNo;
    /**业务号码：业务方传递的业务号*/
    private String bizNo;
    /**批次号*/
    private String batchNo;
    /**支付号码：我们生成的唯一支付号码*/
    private String payNo;
    /**商户编码*/
    private String merchantCode;
    /**第三方支付渠道编码*/
    private String thirdpayCode;
    /**业务类型：保全，承保*/
    private String bizType;
    /**支付方式  同步异步*/
    private String payWay;
    /**支付类型：定义业务方的支付方式，例如73微信。接受参数后需要转换成第三方支付渠道编码*/
    private String payType;
    /**支付状态*/
    private String payStatus;
    /**支付日期*/
    private Date payDate;
    /**收费金额*/
    private BigDecimal payAmount;
    /**支付结果编码*/
    private String payResultCode;
    /**支付结果说明*/
    private String payResultDesc;
    /**支付成功时间*/
    private Date payTime;
    /**付款人姓名*/
    private String accountName;
    /**付款人证件类型*/
    private String cardType;
    /**付款人证件号码*/
    private String cardNo;
    /**付款人手机号码*/
    private String mobile;
    /**付款银行编码*/
    private String bankCode;
    /**付款银行名称*/
    private String bankName;
    /**付款银行账号*/
    private String accountNo;
    /**卡折标识*/
    private String certType;
    /**开户行*/
    private String openBank;
    /**开户行地区*/
    private String openBankArea;
    /**第三方支付号码*/
    private String thirdPayNo;
    /**第三方返回状态码*/
    private String returnCode;
    /**第三方返回信息*/
    private String returnMsg;

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public String getBizNo() {
        return bizNo;
    }

    public void setBizNo(String bizNo) {
        this.bizNo = bizNo;
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public String getPayNo() {
        return payNo;
    }

    public void setPayNo(String payNo) {
        this.payNo = payNo;
    }

    public String getMerchantCode() {
        return merchantCode;
    }

    public void setMerchantCode(String merchantCode) {
        this.merchantCode = merchantCode;
    }

    public String getThirdpayCode() {
        return thirdpayCode;
    }

    public void setThirdpayCode(String thirdpayCode) {
        this.thirdpayCode = thirdpayCode;
    }

    public String getBizType() {
        return bizType;
    }

    public void setBizType(String bizType) {
        this.bizType = bizType;
    }

    public String getPayWay() {
        return payWay;
    }

    public void setPayWay(String payWay) {
        this.payWay = payWay;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus;
    }

    public Date getPayDate() {
        return payDate;
    }

    public void setPayDate(Date payDate) {
        this.payDate = payDate;
    }

    public BigDecimal getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
    }

    public String getPayResultCode() {
        return payResultCode;
    }

    public void setPayResultCode(String payResultCode) {
        this.payResultCode = payResultCode;
    }

    public String getPayResultDesc() {
        return payResultDesc;
    }

    public void setPayResultDesc(String payResultDesc) {
        this.payResultDesc = payResultDesc;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getBankCode() {
        return bankCode;
    }

    public void setBankCode(String bankCode) {
        this.bankCode = bankCode;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getAccountNo() {
        return accountNo;
    }

    public void setAccountNo(String accountNo) {
        this.accountNo = accountNo;
    }

    public String getCertType() {
        return certType;
    }

    public void setCertType(String certType) {
        this.certType = certType;
    }

    public String getOpenBank() {
        return openBank;
    }

    public void setOpenBank(String openBank) {
        this.openBank = openBank;
    }

    public String getOpenBankArea() {
        return openBankArea;
    }

    public void setOpenBankArea(String openBankArea) {
        this.openBankArea = openBankArea;
    }

    public String getThirdPayNo() {
        return thirdPayNo;
    }

    public void setThirdPayNo(String thirdPayNo) {
        this.thirdPayNo = thirdPayNo;
    }

    public String getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    public String getReturnMsg() {
        return returnMsg;
    }

    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }



    /**
     * 取得对应传入参数的String形式的字段值
     * @param: FCode String 希望取得的字段名
     * @return: String
     * 如果没有对应的字段，返回""
     * 如果字段值为空，返回"null"
     **/
    public String getV(String FCode)
    {
        String strReturn = "";
        if (FCode.equalsIgnoreCase("SerialNo"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(serialNo));
        }
        if (FCode.equalsIgnoreCase("BizNo"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(bizNo));
        }
        if (FCode.equalsIgnoreCase("BatchNo"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(batchNo));
        }
        if (FCode.equalsIgnoreCase("PayNo"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(payNo));
        }
        if (FCode.equalsIgnoreCase("MerchantCode"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(merchantCode));
        }
        if (FCode.equalsIgnoreCase("ThirdpayCode"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(thirdpayCode));
        }
        if (FCode.equalsIgnoreCase("BizType"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(bizType));
        }
        if (FCode.equalsIgnoreCase("PayWay"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(payWay));
        }
        if (FCode.equalsIgnoreCase("PayAmount"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(payAmount));
        }
        if (FCode.equalsIgnoreCase("PayType"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(payType));
        }
        if (FCode.equalsIgnoreCase("PayStatus"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(payStatus));
        }
        if (FCode.equalsIgnoreCase("PayDate"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(payDate));
        }
        if (FCode.equalsIgnoreCase("AccountName"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(accountName));
        }
        if (FCode.equalsIgnoreCase("CardType"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(cardType));
        }
        if (FCode.equalsIgnoreCase("CardNo"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(cardNo));
        }
        if (FCode.equalsIgnoreCase("Mobile"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(mobile));
        }
        if (FCode.equalsIgnoreCase("PayDate"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf( this.getPayDate()));
        }
        if (FCode.equalsIgnoreCase("BankCode"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(bankCode));
        }
        if (FCode.equalsIgnoreCase("BankName"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(bankName));
        }
        if (FCode.equalsIgnoreCase("AccountNo"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(accountNo));
        }
        if (FCode.equalsIgnoreCase("CertType"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(certType));
        }
        if (FCode.equalsIgnoreCase("OpenBank"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(openBank));
        }
        if (FCode.equalsIgnoreCase("OpenBankArea"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(openBankArea));
        }
        if (FCode.equalsIgnoreCase("ThirdPayNo"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(thirdPayNo));
        }
        if (FCode.equalsIgnoreCase("ReturnCode"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(returnCode));
        }
        if (FCode.equalsIgnoreCase("ReturnMsg"))
        {
            strReturn = StrTool.GBKToUnicode(String.valueOf(returnMsg));
        }
        if (strReturn.equals(""))
        {
            strReturn = "null";
        }

        return strReturn;
    }
}
